/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.DesignPatterns.behavioral.mediator;

/**
 *
 * @author Nashief
 */
public class AmericanSeller {
    
    Mediator mediator; 
    float priceinDollars;

    public AmericanSeller() {
    }
    
    
    public AmericanSeller(Mediator mediator,float priceInDollars){
    
        this.mediator=mediator; 
        this.priceinDollars=priceInDollars; 
        this.mediator.registerAmericanSeller(this);
    
    }
    public boolean isBidAccepted(float bidInDollars){
    
        if(bidInDollars>=priceinDollars){
        System.out.println("The seller accepts the bid of"+bidInDollars+"dollars\n");
        return true;
        }else{
         System.out.println("The seller rejects the bid of"+bidInDollars+"dollars\n");
        return false;
        }
    
    }
    
}
